#include "User.hpp"
#include "md5.h"

User::User(string username, string password)
{
	this->setUsername(username);
	this->setPassword(password);
}

void User::setUsername(string _username)
{
	this->username = _username;
}

void User::setPassword(string _password)
{
	this->password = md5(_password);
}

void User::setPermissions(Permissions& permissions)
{
	this->permissions = permissions;
}

string User::getUsername()
{
	return this->username;
}

string User::getPassword()
{
	return this->password;
}

Permissions& User::getPermissions()
{
	return this->permissions;
}

void User::display()
{
	cout << "Username: " << this->username << endl;
	cout << "Password: " << this->password << endl;
}